<?php
/**
 * AllOfCreativeErrorCreativeError
 *
 * PHP version 5
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */

/**
 * Amazon Ads API - Sponsored Brands
 *
 * Use the Amazon Ads API for Sponsored Brands for campaign, ad group, keyword, negative keyword, drafts, Stores, landing pages, and Brands management operations. For more information about Sponsored Brands, see the [Sponsored Brands Support Center](https://advertising.amazon.com/help#GQFZA83P55P747BZ). For onboarding information, see the [account setup](https://advertising.amazon.com/API/docs/v3/guides/account_setup) topic.
 *
 * OpenAPI spec version: 3.0
 * 
 * Generated by:https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api.git
 * AmazonAdvertisingApi Codegen version: 3.0.51
 */
/**
 * NOTE: This class is auto generated by the AmazonAdvertisingApi code generator program.
 *https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 * Do not edit the class manually.
 */

namespace AmazonAdvertisingApi\Model;
use \AmazonAdvertisingApi\ObjectSerializer;

/**
 * AllOfCreativeErrorCreativeError Class Doc Comment
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */
class AllOfCreativeErrorCreativeError extends BasicErrorObject 
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $AmazonAdvertisingApiModelName = 'AllOfCreativeErrorCreativeError';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiTypes = [
        'max_length' => 'string',
        'emoji' => 'string',
        'invalid_characters' => 'string',
        'note' => 'string',
        'expected_type' => 'string',
        'actual_type' => 'string',
        'max_size' => 'string',
        'asins' => 'string',
        'crop_field' => 'string',
        'min' => 'string',
        'top' => 'string',
        'crop_height' => 'string',
        'image_height' => 'string',
        'left' => 'string',
        'crop_width' => 'string',
        'image_width' => 'string',
        'aspect_ratio' => 'string',
        'required_aspect_ratio' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiFormats = [
        'max_length' => null,
        'emoji' => null,
        'invalid_characters' => null,
        'note' => null,
        'expected_type' => null,
        'actual_type' => null,
        'max_size' => null,
        'asins' => null,
        'crop_field' => null,
        'min' => null,
        'top' => null,
        'crop_height' => null,
        'image_height' => null,
        'left' => null,
        'crop_width' => null,
        'image_width' => null,
        'aspect_ratio' => null,
        'required_aspect_ratio' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiTypes()
    {
        return self::$AmazonAdvertisingApiTypes + parent::AmazonAdvertisingApiTypes();
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiFormats()
    {
        return self::$AmazonAdvertisingApiFormats + parent::AmazonAdvertisingApiFormats();
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'max_length' => 'maxLength',
        'emoji' => 'emoji',
        'invalid_characters' => 'invalidCharacters',
        'note' => 'note',
        'expected_type' => 'expectedType',
        'actual_type' => 'actualType',
        'max_size' => 'maxSize',
        'asins' => 'asins',
        'crop_field' => 'cropField',
        'min' => 'min',
        'top' => 'top',
        'crop_height' => 'cropHeight',
        'image_height' => 'imageHeight',
        'left' => 'left',
        'crop_width' => 'cropWidth',
        'image_width' => 'imageWidth',
        'aspect_ratio' => 'aspectRatio',
        'required_aspect_ratio' => 'requiredAspectRatio'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'max_length' => 'setMaxLength',
        'emoji' => 'setEmoji',
        'invalid_characters' => 'setInvalidCharacters',
        'note' => 'setNote',
        'expected_type' => 'setExpectedType',
        'actual_type' => 'setActualType',
        'max_size' => 'setMaxSize',
        'asins' => 'setAsins',
        'crop_field' => 'setCropField',
        'min' => 'setMin',
        'top' => 'setTop',
        'crop_height' => 'setCropHeight',
        'image_height' => 'setImageHeight',
        'left' => 'setLeft',
        'crop_width' => 'setCropWidth',
        'image_width' => 'setImageWidth',
        'aspect_ratio' => 'setAspectRatio',
        'required_aspect_ratio' => 'setRequiredAspectRatio'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'max_length' => 'getMaxLength',
        'emoji' => 'getEmoji',
        'invalid_characters' => 'getInvalidCharacters',
        'note' => 'getNote',
        'expected_type' => 'getExpectedType',
        'actual_type' => 'getActualType',
        'max_size' => 'getMaxSize',
        'asins' => 'getAsins',
        'crop_field' => 'getCropField',
        'min' => 'getMin',
        'top' => 'getTop',
        'crop_height' => 'getCropHeight',
        'image_height' => 'getImageHeight',
        'left' => 'getLeft',
        'crop_width' => 'getCropWidth',
        'image_width' => 'getImageWidth',
        'aspect_ratio' => 'getAspectRatio',
        'required_aspect_ratio' => 'getRequiredAspectRatio'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return parent::attributeMap() + self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return parent::setters() + self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return parent::getters() + self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$AmazonAdvertisingApiModelName;
    }




    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        parent::__construct($data);

        $this->container['max_length'] = isset($data['max_length']) ? $data['max_length'] : null;
        $this->container['emoji'] = isset($data['emoji']) ? $data['emoji'] : null;
        $this->container['invalid_characters'] = isset($data['invalid_characters']) ? $data['invalid_characters'] : null;
        $this->container['note'] = isset($data['note']) ? $data['note'] : null;
        $this->container['expected_type'] = isset($data['expected_type']) ? $data['expected_type'] : null;
        $this->container['actual_type'] = isset($data['actual_type']) ? $data['actual_type'] : null;
        $this->container['max_size'] = isset($data['max_size']) ? $data['max_size'] : null;
        $this->container['asins'] = isset($data['asins']) ? $data['asins'] : null;
        $this->container['crop_field'] = isset($data['crop_field']) ? $data['crop_field'] : null;
        $this->container['min'] = isset($data['min']) ? $data['min'] : null;
        $this->container['top'] = isset($data['top']) ? $data['top'] : null;
        $this->container['crop_height'] = isset($data['crop_height']) ? $data['crop_height'] : null;
        $this->container['image_height'] = isset($data['image_height']) ? $data['image_height'] : null;
        $this->container['left'] = isset($data['left']) ? $data['left'] : null;
        $this->container['crop_width'] = isset($data['crop_width']) ? $data['crop_width'] : null;
        $this->container['image_width'] = isset($data['image_width']) ? $data['image_width'] : null;
        $this->container['aspect_ratio'] = isset($data['aspect_ratio']) ? $data['aspect_ratio'] : null;
        $this->container['required_aspect_ratio'] = isset($data['required_aspect_ratio']) ? $data['required_aspect_ratio'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = parent::listInvalidProperties();

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets max_length
     *
     * @return string
     */
    public function getMaxLength()
    {
        return $this->container['max_length'];
    }

    /**
     * Sets max_length
     *
     * @param string $max_length max_length
     *
     * @return $this
     */
    public function setMaxLength($max_length)
    {
        $this->container['max_length'] = $max_length;

        return $this;
    }

    /**
     * Gets emoji
     *
     * @return string
     */
    public function getEmoji()
    {
        return $this->container['emoji'];
    }

    /**
     * Sets emoji
     *
     * @param string $emoji emoji
     *
     * @return $this
     */
    public function setEmoji($emoji)
    {
        $this->container['emoji'] = $emoji;

        return $this;
    }

    /**
     * Gets invalid_characters
     *
     * @return string
     */
    public function getInvalidCharacters()
    {
        return $this->container['invalid_characters'];
    }

    /**
     * Sets invalid_characters
     *
     * @param string $invalid_characters invalid_characters
     *
     * @return $this
     */
    public function setInvalidCharacters($invalid_characters)
    {
        $this->container['invalid_characters'] = $invalid_characters;

        return $this;
    }

    /**
     * Gets note
     *
     * @return string
     */
    public function getNote()
    {
        return $this->container['note'];
    }

    /**
     * Sets note
     *
     * @param string $note note
     *
     * @return $this
     */
    public function setNote($note)
    {
        $this->container['note'] = $note;

        return $this;
    }

    /**
     * Gets expected_type
     *
     * @return string
     */
    public function getExpectedType()
    {
        return $this->container['expected_type'];
    }

    /**
     * Sets expected_type
     *
     * @param string $expected_type expected_type
     *
     * @return $this
     */
    public function setExpectedType($expected_type)
    {
        $this->container['expected_type'] = $expected_type;

        return $this;
    }

    /**
     * Gets actual_type
     *
     * @return string
     */
    public function getActualType()
    {
        return $this->container['actual_type'];
    }

    /**
     * Sets actual_type
     *
     * @param string $actual_type actual_type
     *
     * @return $this
     */
    public function setActualType($actual_type)
    {
        $this->container['actual_type'] = $actual_type;

        return $this;
    }

    /**
     * Gets max_size
     *
     * @return string
     */
    public function getMaxSize()
    {
        return $this->container['max_size'];
    }

    /**
     * Sets max_size
     *
     * @param string $max_size max_size
     *
     * @return $this
     */
    public function setMaxSize($max_size)
    {
        $this->container['max_size'] = $max_size;

        return $this;
    }

    /**
     * Gets asins
     *
     * @return string
     */
    public function getAsins()
    {
        return $this->container['asins'];
    }

    /**
     * Sets asins
     *
     * @param string $asins asins
     *
     * @return $this
     */
    public function setAsins($asins)
    {
        $this->container['asins'] = $asins;

        return $this;
    }

    /**
     * Gets crop_field
     *
     * @return string
     */
    public function getCropField()
    {
        return $this->container['crop_field'];
    }

    /**
     * Sets crop_field
     *
     * @param string $crop_field crop_field
     *
     * @return $this
     */
    public function setCropField($crop_field)
    {
        $this->container['crop_field'] = $crop_field;

        return $this;
    }

    /**
     * Gets min
     *
     * @return string
     */
    public function getMin()
    {
        return $this->container['min'];
    }

    /**
     * Sets min
     *
     * @param string $min min
     *
     * @return $this
     */
    public function setMin($min)
    {
        $this->container['min'] = $min;

        return $this;
    }

    /**
     * Gets top
     *
     * @return string
     */
    public function getTop()
    {
        return $this->container['top'];
    }

    /**
     * Sets top
     *
     * @param string $top top
     *
     * @return $this
     */
    public function setTop($top)
    {
        $this->container['top'] = $top;

        return $this;
    }

    /**
     * Gets crop_height
     *
     * @return string
     */
    public function getCropHeight()
    {
        return $this->container['crop_height'];
    }

    /**
     * Sets crop_height
     *
     * @param string $crop_height crop_height
     *
     * @return $this
     */
    public function setCropHeight($crop_height)
    {
        $this->container['crop_height'] = $crop_height;

        return $this;
    }

    /**
     * Gets image_height
     *
     * @return string
     */
    public function getImageHeight()
    {
        return $this->container['image_height'];
    }

    /**
     * Sets image_height
     *
     * @param string $image_height image_height
     *
     * @return $this
     */
    public function setImageHeight($image_height)
    {
        $this->container['image_height'] = $image_height;

        return $this;
    }

    /**
     * Gets left
     *
     * @return string
     */
    public function getLeft()
    {
        return $this->container['left'];
    }

    /**
     * Sets left
     *
     * @param string $left left
     *
     * @return $this
     */
    public function setLeft($left)
    {
        $this->container['left'] = $left;

        return $this;
    }

    /**
     * Gets crop_width
     *
     * @return string
     */
    public function getCropWidth()
    {
        return $this->container['crop_width'];
    }

    /**
     * Sets crop_width
     *
     * @param string $crop_width crop_width
     *
     * @return $this
     */
    public function setCropWidth($crop_width)
    {
        $this->container['crop_width'] = $crop_width;

        return $this;
    }

    /**
     * Gets image_width
     *
     * @return string
     */
    public function getImageWidth()
    {
        return $this->container['image_width'];
    }

    /**
     * Sets image_width
     *
     * @param string $image_width image_width
     *
     * @return $this
     */
    public function setImageWidth($image_width)
    {
        $this->container['image_width'] = $image_width;

        return $this;
    }

    /**
     * Gets aspect_ratio
     *
     * @return string
     */
    public function getAspectRatio()
    {
        return $this->container['aspect_ratio'];
    }

    /**
     * Sets aspect_ratio
     *
     * @param string $aspect_ratio aspect_ratio
     *
     * @return $this
     */
    public function setAspectRatio($aspect_ratio)
    {
        $this->container['aspect_ratio'] = $aspect_ratio;

        return $this;
    }

    /**
     * Gets required_aspect_ratio
     *
     * @return string
     */
    public function getRequiredAspectRatio()
    {
        return $this->container['required_aspect_ratio'];
    }

    /**
     * Sets required_aspect_ratio
     *
     * @param string $required_aspect_ratio required_aspect_ratio
     *
     * @return $this
     */
    public function setRequiredAspectRatio($required_aspect_ratio)
    {
        $this->container['required_aspect_ratio'] = $required_aspect_ratio;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
